<template>
  <view class="search-advice" :class="{ active: option.show }" @touchmove.stop="()=>{}">
    <view class="content-block">
      <b-image class-name="header" src="/static/images/biHuaSuan/bg_clip.png" mode="widthFix" :is-asset="true" />
      <view class="content">
        <view class="text">{{ option.clipData }}</view>
        <view class="btn" @click="handleClick('search')">立即搜索</view>
      </view>
      <view class="close" @click="handleClick('close')">
        <b-image src="/static/images/commodity/close_ico.png" mode="aspectFit" />
      </view>
    </view>
  </view>
</template>
<script>
import './index.scss'
export default {
  name: 'SearchAdvice',
  props: {
    option: {
      type: Object,
      default() {
        return {
          show: false,
          clipData: ''
        }
      }
    }
  },
  methods: {
    handleClick(type) {
      this.$emit(type)
    }
  }
}
</script>
